<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://www.ecside.org" prefix="ec"%>
<%@ page language="java" import="java.util.*" %>
<%@ page import="com.agileai.domain.DataRow"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>共享资源</title>
<style>
.tab1{
	display: none;
}
iframe{
	margin-top:10px;
}
</style>
<% List<DataRow>tabList=(List<DataRow>)request.getAttribute("tabList");%>
<% List<Integer>hidenIndexlist=(List<Integer>)request.getAttribute("hidenIndexlist"); %>
 
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">
function changeTab(tabId){
		var projectId="&PI_ID="+'<%=pageBean.inputValue("projectId")%>';
		
		<%for(DataRow row:tabList){%>
			if("<%=row.getString("fnName")%>" == tabId){
				var url = "index?<%=row.getString("hanaderId")%>&operaType=<%=row.getString("detail")%>"+projectId+"&fnName=<%=row.getString("fnName")%>&userPost=<%=row.getString("userPost")%>"; 
				$('#<%=row.getString("fnName")%>').attr("src",url);
		 	}
		<%}%>
}
</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
<%@include file="/jsp/inc/message.inc.jsp"%>
<div style="padding-top: 7px;">
	<div class="photobg1" id="tabHeader">
		<%for(DataRow row:tabList){%>
			<div id="tab_<%=row.getInt("fnId")%>" class="newarticle1" onclick="changeTab('<%=row.getString("fnName")%>')"><%=row.getString("fnTitle")%></div>
		<%}%>
	    <input type="hidden" name="tabId" id="tabId" value="" />
	</div>
	
	<%for(DataRow row:tabList){%>
		<div class="photobox newarticlebox" id="Layer<%=row.getInt("fnId")%>"  style="height:620px;display:none;overflow:hidden;">
			<iframe id="<%=row.getString("fnName")%>" src="" width="100%" scrolling=auto height="630px"  frameborder="0" scrolling="no"></iframe>
		</div>
	<%}%>
 </div>

</form>
<script language="JavaScript">
$(function(){
	changeTab('<%=pageBean.inputValue("defindTabId")%>');
	resetTabHeight(80);
 
	<%for(int i:hidenIndexlist){%>
	 $("#tab_<%=i%>").hide();
	 <%}%>
});
var tab = new Tab('tab','tabHeader','Layer',<%=pageBean.inputValue("defindTabIndex")%>);
tab.focus(<%=pageBean.inputValue("defindTabIndex")%>);

var showPictureBox;
function showBugImg(resId){
	var url = 'index?ShowBigPicture&resId='+resId;
	if (!showPictureBox){
		showPictureBox = new PopupBox('showPictureBox',"图片展示",{size:'big',width:'800px',height:'600px',top:'3px'});
	}
	showPictureBox.sendRequest(url); 
}
</script>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
